<div class="product-edit-dialog">
    <h3>新增货品</h3>
    <form (ngSubmit)="save()">
      <div class="form-row">
        <label>货品编码</label>
        <input type="text" [(ngModel)]="product.productCode" name="productCode" required />
      </div>
      <div class="form-row">
        <label>货品名称</label>
        <input type="text" [(ngModel)]="product.productName" name="productName" required />
      </div>
      <div class="form-row">
        <label>规格型号</label>
        <input type="text" [(ngModel)]="product.model" name="model" />
      </div>
      <div class="form-row">
        <label>单位</label>
        <input type="text" [(ngModel)]="product.unit" name="unit" />
      </div>
      <div class="form-row">
        <label>价格</label>
        <input type="number" [(ngModel)]="product.purchasePrice" name="purchasePrice" min="0" />
      </div>
      <div class="form-row">
        <label>类型</label>
        <input type="text" [(ngModel)]="product.productType" name="productType" />
      </div>
      <div class="form-row">
        <label>库存</label>
        <input type="number" [(ngModel)]="product.quantityOnHand" name="quantityOnHand" min="0" />
      </div>
      <div class="form-row">
        <label>备注</label>
        <textarea [(ngModel)]="product.remarks" name="remarks"></textarea>
      </div>
      <div class="dialog-footer">
        <button type="button" (click)="cancel()">取消</button>
        <button type="submit" [disabled]="saving">保存</button>
      </div>
    </form>
  </div>